var images = require('../models/images.js');

exports.showImages = function(req,res){
	if (req.url == '/favicon.ico') {return;}
	var imgid = req.params.id;
	console.log(imgid);
	var arr = [imgid];
	images.select(arr,function(err,results){
		if (err) {
			res.end('查询失败');
		}else if(results!=undefined){
			res.render('images',{ data : results });
		}else{
			res.end('ERROR');
		}
	});
}